const WebpackUserscript = require('webpack-userscript');
const path = require('path');

module.exports = {
  mode: 'development',
  entry: './src/main.js',
  output: {
    filename: 'bundle.user.js',
    path: __dirname + '/dist',
  },
  resolve: {
    alias: {
      '@': path.resolve(__dirname, 'src'),
    }
  },
  plugins: [
    new WebpackUserscript.default({
      headers: {
        name: 'MCP - More Concise Page',
        namespace: 'https://gitee.com/linruoxin-sy',
        version: '1.3.0',
        description: 'a plugin for get a more concise bilibili home page',
        author: 'linruoxin-sy',
        match: [
          'https://www.bilibili.com/',
          'https://www.bilibili.com/?*'
        ],
        icon: 'https://i0.hdslb.com/bfs/static/jinkela/long/images/favicon.ico',
        'run-at': 'document-start',
        grant: 'none',
      },
    }),
  ],
};